
const perssion = {
    state: {
        //用户权限信息
        tableData: [],
        //编辑弹窗显示状态
        dialogVisible: false,
        //编辑框信息
        editForm: {}
    },
    getters: {
    },
    mutations: {
        //设置用户权限信息
        addPerData(state: any, arr: []) {
            state.tableData = arr
        },
        //修改编辑弹窗显示状态
        changePerDialog(state: any) {
            state.dialogVisible = !state.dialogVisible
        },
        //编辑框信息
        showPerEdit(state: any, obj: any) {
            state.editForm = JSON.parse(JSON.stringify(obj))
            console.log(state.editForm);

        },
        //修改用户权限信息
        editPerData(state: any, arr: any) {
            state.editForm.power = arr
        }
    },
    actions: {
        HANDLEDELETE(context: any, obj: any) {
            context.commit('handleDelete', obj)
        }
    },
}
export default perssion;